<?php

        $goodslist = array(
                [   
                    "id" => 'g0',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g1',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g2',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g3',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g4',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g5',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'299',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g6',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'179',
                    "save"=>'30',
                ],[
                    "id" => 'g7',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'129',
                    "save"=>'30',
                ],[
                    "id" => 'g8',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'100',
                    "save"=>'30',
                ],[
                    "id" => 'g9',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'219',
                    "save"=>'30',
                ],[
                    "id" => 'g10',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g11',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g12',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g13',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g14',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'999',
                    "save"=>'30',
                ],[
                    "id" => 'g15',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g16',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'359',
                    "save"=>'30',
                ],[
                    "id" => 'g17',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g18',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g19',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g20',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g21',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g22',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g23',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g24',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'299',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g25',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'179',
                    "save"=>'30',
                ],[
                    "id" => 'g26',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'129',
                    "save"=>'30',
                ],[
                    "id" => 'g27',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'100',
                    "save"=>'30',
                ],[
                    "id" => 'g28',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'219',
                    "save"=>'30',
                ],[
                    "id" => 'g29',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g30',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g31',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g32',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g33',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'999',
                    "save"=>'30',
                ],[
                    "id" => 'g34',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g35',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'359',
                    "save"=>'30',
                ],[
                    "id" => 'g36',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g37',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g38',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g39',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g40',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g41',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'299',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g42',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'179',
                    "save"=>'30',
                ],[
                    "id" => 'g43',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'129',
                    "save"=>'30',
                ],[
                    "id" => 'g44',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'100',
                    "save"=>'30',
                ],[
                    "id" => 'g45',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'219',
                    "save"=>'30',
                ],[
                    "id" => 'g46',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g47',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g48',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g49',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g50',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'999',
                    "save"=>'30',
                ],[
                    "id" => 'g51',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g52',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'359',
                    "save"=>'30',
                ],[
                    "id" => 'g53',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g54',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g55',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g56',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g57',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g58',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'299',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g59',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'179',
                    "save"=>'30',
                ],[
                    "id" => 'g60',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'129',
                    "save"=>'30',
                ],[
                    "id" => 'g61',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'100',
                    "save"=>'30',
                ],[
                    "id" => 'g62',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'219',
                    "save"=>'30',
                ],[
                    "id" => 'g63',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g64',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g65',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g66',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g67',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'999',
                    "save"=>'30',
                ],[
                    "id" => 'g68',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g69',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'359',
                    "save"=>'30',
                ],[
                    "id" => 'g70',
                    "url"=>'../imgs/zhuti.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'199',
                    "save"=>'30',
                ],[
                    "id" => 'g71',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'169',
                    "save"=>'30',
                ],[
                    "id" => 'g72',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g73',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'119',
                    "save"=>'30',
                ],[
                    "id" => 'g74',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'269',
                    "save"=>'30',
                ],[
                    "id" => 'g75',
                    "url"=>'../imgs/zhuti3.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'299',
                    "price"=>'159',
                    "save"=>'30',
                ],[
                    "id" => 'g76',
                    "url"=>'../imgs/zhuti1.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'179',
                    "save"=>'30',
                ],[
                    "id" => 'g77',
                    "url"=>'../imgs/zhuti2.png',
                    "name"=>'Decent Module Case Silicone Skin Cover for iPhone...',
                    "yuanjia"=>'219',
                    "price"=>'129',
                    "save"=>'30',
                ]);
        
        // $arrlength=count($goodslist);
        // echo $arrlength;
        // echo json_encode($goodslist[1]);

        //尝试导入数据库
        require ("connect.php");


        foreach($goodslist as $item){
            $sql = "INSERT INTO `goodslist`(`id`, `url`, `name`, `yuanjia`, `price`, `save`) VALUES ('".$item['id']."','".$item['url']."','".$item['name']."','".$item['yuanjia']."','".$item['price']."','".$item['save']."')";

            // $sql = "INSERT INTO `goodslist`(`id`, `url`, `name`, `yuanjia`, `price`, `save`) VALUES ('g0','../imgs/zhuti1.png','Decent Module Case Silicone Skin Cover for iPhone...',219,119,30)";

            $conn->query($sql);
            // $result = $conn -> query($sql);
            // var_dump($conn);
            // echo $result;    
            // break;
            // echo $sql;
            // echo $sql;

        }
        // $sql = "INSERT INTO `goodslist`(`id`, `url`, `name`, `yuanjia`, `price`, `save`) VALUES (1,2,3,4,5,6)";
        //     $conn->query($sql);


        //执行sql语句
        // $conn -> query($sql);


        $conn -> close();

        // echo "成功录入数据";





?>